package com.cn.test1.service;


import com.cn.test1.data.DescriptionData;
import com.cn.test1.model.DescriptionModel;

import java.util.ArrayList;
import java.util.List;

//服务层
public class DescriptionService {
    public List<DescriptionModel> getDesNav(){
        List<DescriptionModel> list = new ArrayList<>();
        DescriptionData descriptionData = new DescriptionData();
        for(int i = 0; i < descriptionData.desnav.length; i++){
            DescriptionModel descriptionModel = new DescriptionModel();
            descriptionModel.setDesnav(descriptionData.desnav[i]);
            list.add(descriptionModel);
        }
        return  list;
    }
    public List<DescriptionModel> getDesInfo() {
        List<DescriptionModel> list = new ArrayList<>();
        DescriptionData descriptionData = new DescriptionData();
        for (int i = 0; i < descriptionData.desinfo1.length; i++) {
            DescriptionModel descriptionModel = new DescriptionModel();
            descriptionModel.setDesinfo1(descriptionData.desinfo1[i]);
            descriptionModel.setDesinfo2(descriptionData.desinfo2[i]);
            descriptionModel.setDesinfo3(descriptionData.desinfo3[i]);
            descriptionModel.setDesinfo4(descriptionData.desinfo4[i]);
            descriptionModel.setDesinfo5(descriptionData.desinfo5[i]);
            list.add(descriptionModel);
        }
        return list;
    }

}
